package 文件IO.文件删除;

import java.io.File;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        //延时删除
        File f = new File("./test.txt");

        f.deleteOnExit();//jvm结束才删除
        sc.next();
        System.out.println(f.exists());
    }
    public static void main1(String[] args) {
        File  f = new File("./test");
        System.out.println(f.exists());
        boolean rel =f.delete();
        System.out.println(rel);
        System.out.println(f.exists());
    }
}
